<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }
    body {
      padding: 50px;
    }

    .check-box {
      position: relative;
      margin: 5px 0;
      cursor: pointer;
    }
    .check-box span {
      position: relative;
      display: block;
      width: 80px;
      height: 40px;
      background-color: #ff4949;
      border-radius: 40px;
      box-shadow: 
        inset 0 1px 8px rgba(0,0,0,0.3),
        inset 0 -2px 2px rgba(0,0,0,0.3),
        2px 2px 2px #ccc;
      transition: all .5s;
    }
    .check-box i {
      position: absolute;
      left: 0;
      top: 0;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background: #f1f1f1;
      box-shadow: 
        0 2px 6px rgba(0, 0, 0, 0.5),
        inset 0 3px 3px rgba(255, 255, 255, 0.8);
      transform: scale(0.9);
      transition: all .5s;
    }
    .check-box input:checked ~ i {
      left: 40px;
    }
    .check-box input:checked ~ span {
      background-color: #13ce66;
    }
  </style>
</head>
<body>

    <label class="check-box" for="check-input">
      <input id="check-input" type="checkbox" hidden>
      <span></span>
      <i></i>
    </label>

</body>
</html>